package com.itheima.tlias84.mapper;

import com.itheima.tlias84.dto.SelectScoreById;
import com.itheima.tlias84.dto.SelectStudentByIdDTO;
import com.itheima.tlias84.dto.SelectStudentDTO;
import com.itheima.tlias84.po.InsertStudentParam;
import com.itheima.tlias84.po.SelectStudentPageParam;
import com.itheima.tlias84.po.UpdateScoreByIdParam;
import com.itheima.tlias84.po.UpdateStudentParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface StudentMapper {

    List<SelectStudentDTO> selectStudentByPage(@Param("p")SelectStudentPageParam param);

    SelectStudentByIdDTO selectStudentById(@Param("id") Integer id);

    int updateStudent(@Param("p")UpdateStudentParam param);

    int insertStudent(@Param("p") InsertStudentParam param);

    int batchDelete(@Param("ids") List<Integer> ids);

    int updateScore(@Param("id")Integer id,@Param("s") Integer score);
}
